package com.tencent.welink.api.space.object.manage;

import com.tencent.welink.api.OpenApiTokenChange;
import com.tencent.welink.api.base.WelinkOpenApi;
import com.tencent.welink.config.BussinessConfig;
import com.tencent.welink.util.CrontabUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.Map;

/**
 * @Description: 解密通用id对象信息二维码字符串
 * @Author: limye
 * @CreateDate: 2020-6-9
 * @Version: V1.0
 */
public class DecryptionWId extends WelinkOpenApi {

    private static final Logger log = LogManager.getLogger(DecryptionWId.class);

    public DecryptionWId(){
        super("/space/datahub/common-object/decryptionWId",true);
    }


    @Override
    public void displayResult(String result) {
    }


    public static void main(String[] args) {
        new BussinessConfig();
        CrontabUtil.addTaskInRate(new OpenApiTokenChange(), BussinessConfig.loginDurationMinutes,true);

        //实例化对象
        DecryptionWId instance = new DecryptionWId();

        /**
         * 参数名	类型	必填	描述	数据约束
         * token	String	是	非空且长度固定128个字符	动态密钥，有效期20分钟，需重新登录
         * encryptionString	String	是	加密字符串
         */

        //添加参数
        Map<String,Object> map = instance.getExtendsPara();
        map.put("encryptionString","NEQ0N0Q4OTRBQ0U3NzkwQkI2MEIwOEJBQUQ1NzRCOUFGRUU4NkJGNkQzRDhCRDQ5RTA2MkI2MzU3MjdDQjZFMUJGMzkzRjI4NERCNzgzMDBDQkVERTRGM0UzRTFDREY0Rjc0MkY2OEU2RDVGMzc1NjRDRDIwN0UyOTg4MzUyMjk3QTU3RjA1MjYyM0QxMUU5RUU4NDM2QTEzNTgyRTgxQkNBOUE3OTQxQUVFOTFFNDdGQTlCMDgwOUNERDA4MjRDMkRENjgxMzZCQkFBRUI0MTMwOTE4NTNGQTdGNTY3NzY=");

        //执行HTTP请求及展示结果
        instance.DoHttp();
        CrontabUtil.shutdown();

    }
}
